package com.kuyun.controller;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.kuyun.entity.Introduce;
import com.kuyun.service.IntroduceService;

@Controller
@RequestMapping("/introduce")
public class IntroduceController {
	
	@Autowired
	private IntroduceService introduceService;
	
	@RequestMapping(value="/selectContent")
	@ResponseBody
	public Object selectContent(String content) {
		System.out.println("1111111111111");	
//		String content
		int a = introduceService.selectContent(content);
		if(a>0){
			return 1;
		}else{
			return 0;
		}
		
	}
	
	@RequestMapping(value="/selectComment")
	@ResponseBody
	public Object selectComment() {
		System.out.println("-------------------------");
		List<Introduce> a =introduceService.selectComment();
		
		return a;
	}

}
